package com.linln.modules.system.dao;

import com.github.pagehelper.Page;
import com.linln.modules.system.entity.UserOrder;
import com.linln.modules.system.entity.UserOrderExample;
import com.linln.modules.system.vo.UserOrderDetailVO;
import com.linln.modules.system.vo.UserOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface UserOrderMapper {
    int countByExample(UserOrderExample example);

    int deleteByExample(UserOrderExample example);

    int deleteByPrimaryKey(String id);

    int insert(UserOrder record);

    int insertSelective(UserOrder record);

    List<UserOrder> selectByExample(UserOrderExample example);

    UserOrder selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") UserOrder record, @Param("example") UserOrderExample example);

    int updateByExample(@Param("record") UserOrder record, @Param("example") UserOrderExample example);

    int updateByPrimaryKeySelective(UserOrder record);

    int updateByPrimaryKey(UserOrder record);

    Page<UserOrderVO> getUserOrderVOs(@Param("userId") String userId) throws Exception;

    UserOrderDetailVO getOrderDetailVoById(@Param("orderId") String orderId);

    Page<UserOrderDetailVO> getAllOrderDetailVo(@Param("username") String username,@Param("mobile")String mobile);

    int updateState(@Param("orderId")String orderId, @Param("time")String time);

    int delOrderById(@Param("orderId")String orderId);

    Integer getOrderStates(@Param("orderId")String orderId);
}